//
// Created by hkkzzxz on 24-9-2.
//

#ifndef YUNSHI_SECURITY_H
#define YUNSHI_SECURITY_H

#include <iostream>

#include "LogManager.h"

class Security {
public:
    // 生成盐值
    std::string generateSalt();

    // 对密码哈希加密
    std::string hashPassword(const std::string &password, const std::string &salt);

private:
    const int SALT_LENGTH = 16;

    LogManager *logManager = LogManager::getInstance();
    std::shared_ptr<spdlog::logger> consoleLogger = logManager->getConsoleLogger();
    std::shared_ptr<spdlog::logger> fileLogger = logManager->getFileLogger();
};


#endif //YUNSHI_SECURITY_H
